/**
 * Created by xingkaihang on 2017/5/24.
 */
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { fetchPosts, emptyData } from '../actions/index'
import { getDate } from './../utils/getDate'
import White from './compontens/privilege/white'

// 默认获取数据
const defaultFetchData = () => {
    return (dispatch) => {
        return dispatch(fetchPosts(getDate()))
    }
}

const getItems = state => {
    return {
        list: state.privilegeReducer
    }
}


export default connect( getItems, { defaultFetchData, emptyData })(White)
